package top.tagao.m01_structuralPatterns.s_12_flyweight;

/**
 * @author fu-xiao-liu
 * @Date 2022/8/7 17:46
 */
public class Main {
    public static void main(String[] args) {
        //1、我
        AbstractWaitressFlyweight waitress = Factory.getFlyweight("","我");
        waitress.service();
        System.out.println(waitress);
        //2、佟老师
        AbstractWaitressFlyweight waitress1 = Factory.getFlyweight("","佟老师");
        waitress1.service();
        System.out.println(waitress1);
        waitress1.end();

        //3、刘佳林
        AbstractWaitressFlyweight waitress2 = Factory.getFlyweight("","刘佳林");
        waitress2.service();
        System.out.println(waitress2);

    }
}
